#!/bin/bash
#========================================================================
# Author: YSLin
# Email: 
# File Name: variable_redirect.sh
# Description: 
#   The eval command is not used frequently in script writing. It is useful for those occasions where you want
#   to compose a shell command line using shell special characters that are contained in variables or produced
#   by command substitution.
# Edit History: 
#   2011-01-17    File created.
#========================================================================
OUTPUT="> out.file"
#只會印出hello > out.file不會輸出out.file
echo hello $OUTPUT

#This is needed when shell special characters are inserted via variable substitution or command substitution
OUTPUT="> out.file"
eval echo hello $OUTPUT



